package com.learn.micro_mall.domain.entity.brand;

import com.learn.micro_mall.domain.vo.brand.BrandId;
import lombok.Data;

@Data
public class BrandEntity {

    private BrandId brandId;

    /**
     * 品牌logo
     */
    private String brandLogoUrl;

    /**
     * 品牌描述
     */
    private String desc;

    public boolean valid() throws Exception {
        if(brandId.getBrandName() == null){
            throw new Exception("创建/更新品牌时,品牌名不能为空");
        }
        return true;
    }


}
